package com.dongjiantong.quarantine.enums;

/**
 * Created by mz on 26/12/17.
 *
 */
public enum FileType {

    PHOTO(1,"待处理"),
    VIDEO(2,"待确认");


    private final Integer value;
    private final String description;

    FileType(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public static FileType from(Integer value) {
        for (FileType fileType : FileType.values()) {
            if (fileType.value.equals(value)) {
                return fileType;
            }
        }
        return null;
    }

    public Integer value() {
        return this.value;
    }

    @Override
    public String toString() {
        return description;
    }
}
